package com.yaorange.response.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 响应状态码枚举
 */
@Getter
@AllArgsConstructor
public enum ResultCode {
    SUCCESS(200, "操作成功"),
    FAIL(400, "操作失败"),
    UNAUTHORIZED(401, "未授权或 Token 失效"),
    FORBIDDEN(403, "没有权限访问该资源"),
    NOT_FOUND(404, "请求资源不存在"),
    SERVER_ERROR(500, "服务器内部错误"),
    VALIDATE_FAILED(400, "参数校验失败"),
    LOGIN_SUCCESS(200, "登录成功"),
    LOGOUT_SUCCESS(200, "退出登录成功"),
    RELATION_ERROR(501, "操作失败,存在用户使用角色"),
    NOT_USER(502, "用户名或者密码错误");



    private final int code;
    private final String message;
}